# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: CSSlayer <wengxt@gmail.com>

pkgname=kimtoy
pkgver=1.92
pkgdesc="An input method frontend for KDE"
pkgrel=5
arch=('loong64' 'x86_64')
url="https://store.kde.org/p/1127378/"
license=('GPL')
depends=('kwindowsystem5' 'kwidgetsaddons5' 'plasma-framework5' 'knewstuff5')
makedepends=('extra-cmake-modules' 'ibus' 'dbus-c++' 'scim' 'kfilemetadata5' 'git')
optdepends=('fcitx: fcitx support'
            'scim: scim support'
            'dbus-c++: scim support'
            'ibus: ibus support'
            'kfilemetadata5: for metadata extractor')
source=('git+https://anongit.kde.org/kimtoy.git#commit=a26b67e9eb884d2d89def6809f1a3a96a4e726ed')
sha256sums=('SKIP')

build() {
  cd "${srcdir}/${pkgname}"

  cmake -DCMAKE_INSTALL_PREFIX=/usr -DIBUS_LIBEXEC_DIR='/usr/lib' .
  make
}

package() {
  cd "${srcdir}/${pkgname}"
  make DESTDIR="${pkgdir}" install
}
